import {
  createRouter,
  createWebHashHistory,
  createWebHistory,
} from "vue-router";
import Main from "../views/Main.vue";
import Login from "../views/Login.vue";
import List from "../views/CommunityManagement/CommunityList.vue";
const routes = [
  {
    path: "/",
    component: Login,
    name: "login",
  },
  {
    path: "/list/CommunityList",
    name: "list",
    component: List,
  },
  {
    path: "/home",
    name: "home",
    component: Main,
    // redirect: '/home/CellList',
    children: [
      // 缴费管理
      {
        path: "/home/billingM",
        component: () => import("../views/payManagement/billingM.vue"),
      },
      {
        path: "/home/chargeM",
        component: () => import("../views/payManagement/chargeM.vue"),
      },
      {
        path: "/home/InstrumentM",
        component: () => import("../views/payManagement/InstrumentM.vue"),
      },
      {
        path: "/home/meterM",
        component: () => import("../views/payManagement/meterM.vue"),
      },
      {
        path: "/home/addBilling",
        component: () => import("../views/payManagement/addBilling.vue"),
      },
      {
        path: "/home/editBilling",
        component: () => import("../views/payManagement/editBilling.vue"),
      },
      {
        path: "/home/meterDetail",
        component: () => import("../views/payManagement/meterDetail.vue"),
      },

      /* 车行管理 */
      // 1、区域管理
      {
        path: "/home/RegionalManagement",
        component: () =>
          import("../views/vehicleManagement/RegionalManagement.vue"),
      },
      //新建区域
      {
        path: "/home/NewArea",
        component: () => import("../views/vehicleManagement/NewArea.vue"),
      },
      // 2、车位管理
      {
        path: "/home/ParkingSpaceManagement",
        component: () =>
          import("../views/vehicleManagement/ParkingSpaceManagement.vue"),
      },
      // 3、车辆管理
      {
        path: "/home/CarManagement",
        component: () => import("../views/vehicleManagement/CarManagement.vue"),
      },
      {
        path: "/home/NewCar",
        component: () => import("../views/vehicleManagement/NewCar.vue"),
      },
      // 4、月卡管理
      {
        path: "/home/MonthCardManagement",
        component: () =>
          import("../views/vehicleManagement/MonthCardManagement.vue"),
      },
      // 5、停车缴费管理
      {
        path: "/home/ParkinfPayment",
        component: () =>
          import("../views/vehicleManagement/ParkinfPayment.vue"),
      },

      //物业服务
      {
        path: "/home/RepairManagement",
        name: "RepairManagement",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/RepairManagement/RepairManagement.vue"
          ),
      },
      {
        path: "/home/NewRepairRequest",
        name: "NewRepairRequest",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/RepairManagement/NewRepairRequest.vue"
          ),
      },
      {
        path: "/home/DetailsOfRepair",
        name: "DetailsOfRepair",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/RepairManagement/DetailsOfRepair.vue"
          ),
      },
      //访客记录
      {
        path: "/home/VisitorRecord",
        name: "VisitorRecord",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/VisitorRecord/VisitorRecord.vue"
          ),
      },
      {
        path: "/home/AccessDetails",
        name: "AccessDetails",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/VisitorRecord/AccessDetails.vue"
          ),
      },
      //投诉建议
      {
        path: "/home/ComplaintsSuggestions",
        name: "ComplaintsSuggestions",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/ComplaintsSuggestions/ComplaintsSuggestions.vue"
          ),
      },
      {
        path: "/home/ComplaintDetails",
        name: "ComplaintDetails",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/ComplaintsSuggestions/ComplaintDetails.vue"
          ),
      },
      //活动管理
      {
        path: "/home/EventManagement",
        name: "EventManagement",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/EventManagement/EventManagement.vue"
          ),
      },
      {
        path: "/home/NewActivity",
        name: "NewActivity",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/EventManagement/NewActivity.vue"
          ),
      },
      //公告管理
      {
        path: "/home/AnnouncementManagement",
        name: "AnnouncementManagement",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/AnnouncementManagement/AnnouncementManagement.vue"
          ),
      },
      {
        path: "/home/NewAnnouncement",
        name: "NewAnnouncement",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/PropertyServices/AnnouncementManagement/NewAnnouncement.vue"
          ),
      },
      {
        path: "/home/workPlace",
        name: "workPlace",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/workPlace/workPlace.vue"
          ),
      },
      {
        path: "/home/cellInformation",
        name: "cellInformation",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/dataAdmin/cellInformation.vue"
          ),
      },
      {
        path: "/home/galleryAdmin",
        name: "galleryAdmin",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/dataAdmin/galleryAdmin.vue"
          ),
      },
      {
        path: "/home/newGallery",
        name: "newGallery",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/dataAdmin/newGallery.vue"
          ),
      },
      {
        path: "/home/houseAdmin",
        name: "houseAdmin",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/dataAdmin/houseAdmin.vue"
          ),
      },
      {
        path: "/home/storageRoomAdmin",
        name: "storageRoomAdmin",
        component: () =>
          import(
            /* webpackChunkName: "list" */ "../views/dataAdmin/storageRoomAdmin.vue"
          ),
      },
      // 住户标签
      {
        path: "/home/residentLabels",
        component: () => import("../views/setUpFive/ResidentLabels.vue"),
      },
      // 投诉类型
      {
        path: "/home/typeComplaint",
        component: () => import("../views/setUpFive/TypeComplaint.vue"),
      },
      // 角色管理
      {
        name: "roleMan",
        path: "/home/roleManagement",
        component: () => import("../views/setUpFive/RoleManagement.vue"),
      },
      // 角色管理的新建  不需用渲染导航
      {
        name: "addRole",
        path: "/home/add",
        component: () => import("../views/setUpFive/roleManAdd.vue"),
      },
      // 员工管理
      {
        path: "/home/employeeManagement",
        component: () => import("../views/setUpFive/EmployeeManagement.vue"),
      },
      // 员工管理的新建  不需用渲染导航
      {
        name: "addEmploy",
        path: "/home/addEmploy",
        component: () => import("../views/setUpFive/empInformAdd.vue"),
      },
      // 员工管理的编辑  不需用渲染导航
      // {
      //   name:"editEmploy",
      //   path: "/home/editEmploy",
      //   component: () => import("../views/setUpFive/empInformEdit.vue"),
      // },
      // 轮播图管理
      {
        path: "/home/carouselManagement",
        component: () => import("../views/setUpFive/CarouselManagement.vue"),
      },
      // 轮播图管理的新建  不需用渲染导航
      {
        name: "addCarouse",
        path: "/home/addCarouse",
        component: () => import("../views/setUpFive/carouselMapAdd.vue"),
      },
      // 轮播图管理的编辑  不需用渲染导航
      {
        name: "editCarouse",
        path: "/home/editCarouse",
        component: () => import("../views/setUpFive/carouselMapEdit.vue"),
      },
      // 测试
      {
        name: "ceShi",
        path: "/home/ceShi",
        component: () => import("../views/setUpFive/ceshi.vue"),
      },
      //住户管理
      {
        path: "/home/HouseholdManagement",
        component: () => import('../views/DataManagementList/HouseholdManagement.vue')
      },
      {
        path: "/home/NewHouseholds",
        component: () => import('../views/DataManagementList/NewHouseholds.vue')
      },
      {
        path:"/home/HouseholdDetails",
        component:()=>import('../views/DataManagementList/HouseholdDetails.vue')
    },
    {
        path:"/home/MessageNotification",
        component:()=>import('../views/SystemSetup/MessageNotification.vue')
    },
    {
        path:"/home/OperationLog",
        component:()=>import('../views/SystemSetup/OperationLog.vue')
    },
    {
        path:"/home/PersonalInformation",
        component:()=>import('../views/SystemSetup/PersonalInformation.vue')
    },
    //设备管理
    {
      //设备分类
      path:'/home/equipmentClassification',
      component:()=>import('../views/deviceManagement/EquipmentClassification/EquipmentMaintenanceRecord.vue')
    },
    {
      //公共设备
      path:'/home/publicEquipment',
      component:()=>import('../views/deviceManagement/PublicEquipment/EquipmentClassificationManagement.vue')
    },
    {
      //设备维修
      path:'/home/equipmentMaintenance',
      component:()=>import('../views/deviceManagement/EquipmentMaintenance/PublicEquipmentManagement.vue')
    },
    {
      path:'/home/newDevice',
      component:()=>import('../views/deviceManagement/PublicEquipment/NewDevice.vue')
    },
    {
      path:'/home/EditDevice',
      component:()=>import('../views/deviceManagement/PublicEquipment/EditDevice.vue')
    },
    {
      path:'/home/newRepairOrder',
      component:()=>import('../views/deviceManagement/EquipmentMaintenance/NewRepairOrder.vue')
    },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(), //hash描点模式
  // history: createWebHistory(),//路径模式
  routes,
});

export default router;
